﻿@model LeadExpress.Models.ViewPages.UserManagementModel
           
@{
    ViewBag.Title = "Thêm người dùng";
    Layout = "~/Views/Shared/_Layout.Management.cshtml";
}

<form method="post" class="form" action="/Management/UserList/AddUser">
	<fieldset id="firstStep">
		<h2 class="app">
	        <strong>Express - Cập nhật người dùng</strong>
        </h2>
		<div class="errorMessage" data-bind="visible: InvalidateForm" >
		<span class="error">Xin hãy nhập thông tin bên dưới chính xác.</span>
		</div>				
		<div class="title">
			<h3>Về người dùng</h3>
		</div>
		<div class="columns">
			<div class="col indent">
				<div class="row">
					<label for="text1">Tên đầy đủ:</label>
					<input class="text" id="text1" type="text" data-bind="value: Fullname, attr:{maxlength:50}" name="Fullname" />
				</div>
				<div class="row">
					<label for="text2">Tên trước:</label>
					<input class="text" id="text2" type="text" data-bind="value: FirstName, attr:{maxlength:20}" name="FirstName" />
				</div>
				<div class="row">
					<label for="text3">Tên sau:</label>
					<input class="text" id="text3" type="text" data-bind="value: LastName, attr:{maxlength:30}" name="LastName" />
				</div>
			</div>
			<div class="col">
				<div class="row">
					<label for="text4">Địa chỉ email:<br><span style="font-weight:normal;" class="lightgray">Là tên đăng nhập chính</span></label>
					<input class="text" id="text4" type="text" readonly="readonly" data-bind='value: Email, attr:{maxlength:100}' name="Email"/>
				</div>
                <div class="row">
					<label for="text5">Mật khẩu:</label>
					<input class="text" id="text5" type="password" data-bind="value: Password" name="Password"/>
				</div>
                <div class="row">
					<label for="text6">Xác nhận mật khẩu:</label>
					<input class="text" id="text6" type="password" data-bind="value: ConfirmPassword" />
				</div>
			</div>
		</div>            
		<div class="title">
			<h3>Thông tin người dùng</h3>
		</div>
		<div class="columns">
			<div class="col indent">
                <div class="row">
					<label for="text7">Phone:</label>
					<input type="text" id="text7" class="text" data-bind="value: Phone, attr:{maxlength:20}" name="Phone" />
				</div>
                <div class="row">
					<label for="text8">Phone Ext:</label>
					<input type="text" id="text8" class="text" data-bind="value: PhoneExt, attr:{maxlength:20}" name="PhoneExt" />
				</div>
				<div class="row">
					<label for="text9">Mobile:</label>
					<input class="text" id="text9" type="text" data-bind="value: Mobile, attr:{maxlength:20}" name="Mobile"/>
				</div>
				<div class="row">
					<label for="text10">Fax:</label>
					<input class="text" id="text10" type="text" data-bind="value: Fax, attr:{maxlength:20}" name="Fax"/>
				</div>
			</div>
			<div class="col">
				<div class="row">
					<label for="text11">Địa chỉ:</label>
					<input class="text" id="text11" type="text" data-bind="value: Address, attr:{maxlength:250}" name="Address"/>
				</div>
				<div class="row">
					<label for="text8">Thành phố:</label>
					<input class="text" type="text" data-bind="value: City, attr:{maxlength:50}" name="City"/>
				</div>
				<div class="row">
					<label for="select1">Tỉnh / thành:</label>
					<div class="select-holder">
						<select id="select1" class="select1" data-bind='value: State, foreach: StateOptions, optionsCaption: "Select State"' name="State">
							<option data-bind="value: ID, text: Name">Select State</option>
						</select>
					</div>
				</div>
				<div class="row">
					<label for="text12">Zip:</label>
					<input class="text" id="text12" type="text" data-bind="value: Zipcode, attr:{maxlength:10}" name="Zipcode"/>
				</div>
			</div>
		</div>

		<div class="foot-info">
			<h3 class="centered-wbtn centered-wbtn-bottom save">
  				<span>
  					<a class="btn btn-cancel-page" href="/Management/UserList">previous</a>
					<input type="button" class="btn btn-submit-page" data-bind="click: SubmitForm" value="Submit" />
                </span>
			</h3>
		</div>
	</fieldset>
</form>
<script type="text/javascript">
    var data = @(Html.Raw(Json.Encode(Model)));
</script>
<script src="/Scripts/viewModel/adduser.js" type="text/javascript"></script>